diff options
Diffstat (limited to 'src/routes/invoice/[id]/+page.server.js')
| -rw-r--r-- | src/routes/invoice/[id]/+page.server.js | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/routes/invoice/[id]/+page.server.js b/src/routes/invoice/[id]/+page.server.js index 78607545..d46d039b 100644 --- a/src/routes/invoice/[id]/+page.server.js +++ b/src/routes/invoice/[id]/+page.server.js @@ -1,14 +1,8 @@ -import { get } from '$lib/utils'; +import cookie from 'cookie'; +import { get, post } from '$lib/utils'; export async function load({ params }) { let { id } = params; - let { - amount, - rate, - status, - text, - user: { username } - } = await get(`/invoice?uuid=${id}`); - - return { amount, id, rate, username, status, text }; + return { id, invoice: await get(`/invoice?uuid=${id}`) }; } + |
